<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/jquery-3.4.1.js"></script>
	</head>
	<body>
		<div>文本</div>
		<div class="txt2">文本</div>
		<div class="txt2">文本</div>
		<div class="txt2">文本</div>
		<div class="txt2">文本</div>
		<div id="txt3">文本333</div>
		<div id="txt3">文本</div>
		<div id="txt3">文本2222</div>
		
		<script>
			//DOM
			document.getElementsByTagName("div")[0].innerHTML="获取成功";
			//jquery
			$("div")[0].innerHTML="jquery获取成功";
			$(".txt2")[0].innerHTML="ok";
			console.log($("#txt3").html());
			$(".txt2").html("okkkkk");
		</script>
	</body>
</html>
